package com.akuhome.resource.enums;

import com.akuhome.resource.enums.mapper.CodeBasedEnum;
import com.akuhome.resource.util.CodeEnumUtil;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public enum ProjectStatus implements CodeBasedEnum {
    SPECIAL(0),IN_APPROVAL(1),WAIT_MODIFY(2),WAIT_CONFIRM(3),CONFIRMED(4),COMPLETE(5),OBSOLETE(6);

    private final Integer value;
    ProjectStatus(Integer v){
        this.value = v;
    }
    @JsonValue
    public Integer getValue() {
        return value;
    }
    @JsonCreator
    public static ProjectStatus valueOf(Integer value){
        return CodeEnumUtil.codeOf(ProjectStatus.class,value);
    }

    @Override
    public Integer getCode() {
        return getValue();
    }
}
